feat(appkit): no-config chat UI#368
Open
hubertzub-db wants to merge 4 commits into
Open
Conversation
3635710 to
ec456f5
Compare
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
d2c99cc to
236147a
Compare
- responses-api-transport: normalize CRLF to LF in the SSE line parser
so the "\n\n" frame-boundary split works behind proxies that re-emit
events with CRLF line endings. Adds a CRLF-stream unit test.
- use-scroll-to-bottom: switch from useRef + listener-attach-on-mount
to a state-backed ref callback. The listener-attach effect now
re-runs when the container DOM node changes, so consumers that
conditionally render the scroll container (e.g. behind a loading
gate) still get auto-stick. The public ref type changes from
RefObject<T | null> to (node: T | null) => void; JSX
`ref={containerRef}` keeps working because React accepts both
shapes, and no consumer reads `.current` (verified across the repo).
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Follow-up to the parent fix that switched `useScrollToBottom` from
`useRef` to a state-backed ref callback. `ChatMessages` previously
typed `containerRef` as `RefObject<HTMLDivElement | null>`, which no
longer matches the hook's return shape — the public type signature
needs to follow.
Behavior is unchanged at runtime since the prop is only ever forwarded
to a JSX `ref={...}`, which accepts both ref shapes.
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
236147a to
f730d63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on top of the chat primitives from the previous PR to ship a fully-styled, batteries-included chat UI that works against an
agents()-backed AppKit server with literally one line of JSX.What's new
A new
<ChatApp />component in@databricks/appkit-ui/react/chat:That's the whole thing. No props, no callbacks, no slots. It defaults
apito/api/agents/chat(the AppKitagents()plugin's default mount path), handles approval cards end-to-end (including POSTing the decision to/api/agents/approve), and renders a polished UI: greeting/empty state, message bubbles, reasoning panel, tool-call cards, markdown rendering, and a composer.Demo
Screen.Recording.2026-05-08.at.15.30.32.mov
Tool approval
Reasoning
For people who outgrow the defaults, every section has a
render*slot (renderMessage,renderToolCall,renderComposer) and you can overrideapi,approveUrl,placeholder, etc.Why
The previous PR gave us the building blocks (headless
<Conversation>,<ChatInput>, hooks, transport) for people who want full control. But "full control" is overkill for the 80% case where you just want a chat that works.<ChatApp />is the opinionated counterpart: zero-config for the default agents-plugin setup, with sensible escape hatches when you need them.Playground
A new
/agent-chat-fullroute showcases the no-config path: literally one<ChatApp />tag in a sized container. Sits next to the existing/agentroute (which stays as the build-your-own example).